<?php


namespace app\service\log;


use app\models\log\AdminLogModel;
use app\service\BaseService;

class AdminLogService extends BaseService
{
    public function __construct()
    {
        $this->model = new AdminLogModel();
    }

    public function createLog($userId, $userName, $domain, $link, $params, $type, $ip, $agent, $token, $remark = '')
    {
        $model = $this->model;
        $model->user_id = $userId;
        $model->user_name = $userName;
        $model->domain = $domain;
        $model->link = $link;
        $model->params = $params;
        $model->type = $type;
        $model->ip = $ip;
        $model->agent = $agent;
        $model->token = $token;
        $model->remark = $remark;
        return $model->save();
    }
}